import request from '@/utils/request'

// 创建样品采样
export function createTakeData(data) {
  return request({
    url: '/market/take-data/create',
    method: 'post',
    data: data
  })
}

// 更新样品采样
export function updateTakeData(data) {
  return request({
    url: '/market/take-data/update',
    method: 'put',
    data: data
  })
}

// 删除样品采样
export function deleteTakeData(id) {
  return request({
    url: '/market/take-data/delete?id=' + id,
    method: 'delete'
  })
}

// 获得样品采样
export function getTakeData(id) {
  return request({
    url: '/market/take-data/get?id=' + id,
    method: 'get'
  })
}

// 获得样品采样分页
export function getTakeDataPage(params) {
  return request({
    url: '/market/take-data/page',
    method: 'get',
    params
  })
}
// 导出样品采样 Excel
export function exportTakeDataExcel(params) {
  return request({
    url: '/market/take-data/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}